package com.julian.delegatePattern.gumballMachine.server;

import com.julian.delegatePattern.gumballMachine.GumballMachineRemote;
import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;

public class GumballMachineTestDrive {
    public static void main(String[] args) {
        GumballMachineRemote gumballMachineRemote = null;
        String location;
        int count;

        try{
            location = "seattle.migtygumball.com";
            count = 200;
            gumballMachineRemote = new GumballMachine(location,count);
            LocateRegistry.createRegistry(1902);
            Naming.rebind("rmi://localhost:1902"+
                    "/gumballMachineRemote",gumballMachineRemote);

        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
